﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace WeSpot.Controllers
{
    public class GlobalizationController : Controller
    {
        //
        // GET: /Globalization/
        //[ValidateAntiForgeryToken]
        [HttpPost]
        public ActionResult SetLanguage(string lang)
        {
            HttpContext.Session.Add("Lang", lang);

            //return Content("It works : " + HttpContext.Session["Lang"].ToString()); 
            return RedirectToAction("Index", "Home");
        }
        [AllowAnonymous]
        public ActionResult Dummy(string provider)
        {
            HttpContext.Session["Step_4"] = 1;
            return RedirectToAction("Login", "Account");
            //return RedirectToAction("Index", "Secure");
            //return Redirect(Url.Action("Index", "Secure"));

        }
        //
        // POST: /Globalization/Create

        [HttpPost]
        public ActionResult Create(FormCollection collection)
        {
            try
            {
                // TODO: Add insert logic here

                return RedirectToAction("Index");
            }
            catch
            {
                return View();
            }
        }

        //
        // POST: /Globalization/Edit/5

        [HttpPost]
        public ActionResult Edit(int id, FormCollection collection)
        {
            try
            {
                // TODO: Add update logic here

                return RedirectToAction("Index");
            }
            catch
            {
                return View();
            }
        }

        //
        // POST: /Globalization/Delete/5

        [HttpPost]
        public ActionResult Delete(int id, FormCollection collection)
        {
            try
            {
                // TODO: Add delete logic here

                return RedirectToAction("Index");
            }
            catch
            {
                return View();
            }
        }
    }
}
